<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>编辑角色</title>
    <link rel="stylesheet" href="/static/layui/css/layui.css" />
</head>
<body>


<div class="x-body">
    <div class="layui-form layui-form-pane" style="padding: 20px 40px;">
        <input type="hidden" name="roleId" value="{{ content.roleId }}" />

        <div class="layui-form-item">
            <label for="roleDes" class="layui-form-label">
                <span class="x-red">*</span>角色描述
            </label>
            <div class="layui-input-block">
                <input value="{{ content.roleDes }}" type="text" name="roleDes" id="roleDes" required="" lay-verify="required" autocomplete="off" class="layui-input" />
            </div>
        </div>

        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">*角色权限</label>
            <div class="layui-collapse" id="resourceList">
                {% for items in content.resourceList %}
                    <div class="layui-colla-item">
                        <h2 class="layui-colla-title">{{ items.resourceName }}</h2>
                        <div class="layui-colla-content layui-show">
                            {% for item in items.children %}
                                {% if item.checked %}
                                    <input value="{{ item.resourceId }}" type="checkbox" name="resource" title="{{ item.resourceName }}" checked="">
                                {% else %}
                                    <input value="{{ item.resourceId }}" type="checkbox" name="resource" title="{{ item.resourceName }}">
                                {% endif %}
                            {% endfor %}
                        </div>
                    </div>
                {% endfor %}
            </div>
        </div>

        <div class="layui-form-item" style="width: 80% ;margin: 0 auto">
            <button class="layui-btn" lay-submit="" lay-filter="save">保存</button>
        </div>


    </div>
</div>



<script src="/static/layui/layui.js"></script>
<script src="/static/js/manage/updateRole.js"></script>
</body>
</html>